package com.twu.biblioteca.util;

import java.io.PrintStream;
import java.util.Scanner;

public class InputOutputHandler {

    public static void display(String message)
    {
        out.println(message);
    }

    public static String getString()
    {
        return in.nextLine();
    }

    public static int getInt()
    {
        try
        {
            return Integer.parseInt(in.nextLine());
        }
        catch(NumberFormatException e)
        {
            return -1;
        }
    }

    private static Scanner in =new Scanner(System.in);
    private static PrintStream out  = System.out;
}
